package com.egg.auth.service.user;

import com.egg.auth.entity.user.UserAccount;
import com.egg.auth.enums.account.AccountTypeEnum;
import com.egg.auth.model.request.web.AccountOnPasswordPost;
import com.egg.common.mybatis.service.IBaseService;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Optional;


/**
 * @author east
 */
public interface IUserAccountService extends IBaseService<UserAccount> {


    Long addOnPassword(AccountOnPasswordPost param);

    Optional<UserAccount> findByUsername(String accountType, String username);

    List<UserAccount> findByUserId(Serializable userId);

    Optional<UserAccount> findByUserId(Serializable userId, AccountTypeEnum accountType);

    List<UserAccount> findByUserId(Collection<? extends Serializable> userId);

    List<UserAccount> findByUserId(Collection<? extends Serializable> userId, Optional<AccountTypeEnum> accountType);

    void delByUserId(Serializable userId);

    void delByUserId(Collection<? extends Serializable> userId);


}
